<?php 
    $url = new Url();    
?>
<div id="top-menu">
    <?php if(!isset($_SESSION['user_pm'])){ ?>
        <div id="account">
            <ul>
                <li><a href="<?php echo $url->createUrl("user/login"); ?>" class="login">Đăng nhập</a></li>
                <li><a href="<?php echo $url->createUrl("user/register"); ?>" class="register">Đăng ký</a></li>
            </ul>    
        </div>
        <?php }else{?>
        <div id="account">
            <ul>
                <li><a href="<?=$url->createUrl('user/index')?>" class="my-account">Cá nhân</a></li>
                <li><a href="<?=$url->createUrl('user/logout')?>" class="logout">Thoát</a></li>
            </ul>    
        </div>
        <div id="loggedas">Tài khoản » <a href="<?=$url->createUrl('user/index')?>"><?php echo $_SESSION['user_pm']['username'];?></a></div>
        <?php } ?>
    <ul>
        <li><a href="<?php echo $url->createUrl("site/index"); ?>" class="home">Trang chính</a></li>
        <li><a href="<?php echo $url->createUrl("site/help"); ?>" class="home">Giúp đỡ</a></li>
        <li><a href="<?php echo $url->createUrl("project/list"); ?>" class="projects">Dự án</a></li>
        <?php foreach((array)$data as $row){ ?>
            <li><a href="<?php echo $url->createUrl("project/index",array('project'=>$row['project_alias'])); ?>" class="help"><?php echo $row['project_name']; ?></a></li> 
        <?php } ?>        
        <?php foreach((array)$data_member as $row){ ?>
            <li><a href="<?php echo $url->createUrl("project/index",array('project'=>$row['project_alias'])); ?>" class="help"><?php echo $row['project_name']; ?></a></li> 
        <?php } ?>        
    </ul>
</div>